import request from "@/utils/request";

// 获取树列表
export const getExamTree = () => {
  return request({
    url: "/subject/tree",
    method: "GET",
  });
};

// 获取考试信息列表
export const getExamListApi = (params) => {
  return request({
    url: "/exam/exam",
    method: "GET",
    params,
  });
};

// 获取试卷信息列表
export const getExamPaperApi = (params) => {
  return request({
    url: "/exam/paper",
    method: "GET",
    params,
  });
};

// 添加的方法
export const addExamApi = (data) => {
  return request({
    url: "/exam/exam",
    method: "post",
    data,
  });
};

// 删除的方法
export const delExamApi = (id) => {
  return request({
    url: "/exam/exam/" + id,
    method: "DELETE",
  });
};

// 推送班级解绑方法

export const getBindClassApi = (data) => {
  return request({
    url: "/exam/exam/bindClass",
    method: "post",
    data,
  });
};

// 获取班级列表
export const getExamClassApi = (params) => {
  return request({
    url: "/class/class",
    method: "GET",
    params,
  });
};
